package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// SupervisorWithDrawTranssEntityToDto entity data transfer
func SupervisorWithDrawTranssEntityToDto(supervisorWithDrawTranss []*entity.SupervisorWithDrawTrans) []*model.SupervisorWithDrawTransInfo {
	out := make([]*model.SupervisorWithDrawTransInfo, 0, len(supervisorWithDrawTranss))
	for _, c := range supervisorWithDrawTranss {
		out = append(out, SupervisorWithDrawTransEntityToDto(c))
	}
	return out
}

// SupervisorWithDrawTransEntityToDto entity data transfer
func SupervisorWithDrawTransEntityToDto(e *entity.SupervisorWithDrawTrans) *model.SupervisorWithDrawTransInfo {
	return &model.SupervisorWithDrawTransInfo{

		Id: e.Id,

		SupervisorWithDrawId: e.SupervisorWithDrawId,

		TotalAmount: e.TotalAmount,

		Status: e.Status,

		SupervisorId: e.SupervisorId,

		Delta: e.Delta,

		OperatorId: e.OperatorId,
		Operator:   e.Operator,

		Desc:      e.Desc,
		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
